﻿using System;
using System.ComponentModel.DataAnnotations;

namespace Management.Core.EquipmentFile
{
    /// <summary>
    /// 设备档案
    /// </summary>
    public class EquipmentFile
    {
        [Key]
        public int EquipmentFileID { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "名称")]
        public string Name { get; set; }

        /// <summary>
        /// 规格
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "规格")]
        public string Specification { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "类型")]
        public string genre { get; set; }

        /// <summary>
        /// 区域编号
        /// </summary>
        //[Required(ErrorMessage = "必填")]
        [Display(Name = "区域编号")]
        public int EquipmentAreaID { get; set; }

        /// <summary>
        /// 行政区域编号
        /// </summary>
        //[Required(ErrorMessage = "必填")]
        [Display(Name = "行政区域编号")]
        public int AdministrationAreaID { get; set; }

        /// <summary>
        /// 部门编号
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "部门编号")]
        public int DepartmentID { get; set; }

        /// <summary>
        /// 车间编号
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "车间编号")]
        public int WorkshopID { get; set; }

        /// <summary>
        /// 工序编号
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "工序编号")]
        public int ProcessID { get; set; }


        /// <summary>
        /// 制造厂商
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "制造厂商")]
        public string Manufacturer { get; set; }

        /// <summary>
        /// 是否长期停机
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "是否长期停机")]
        public int IsAlwaysShutdown { get; set; }

        /// <summary>
        /// 长期停机原因
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "长期停机原因")]
        public string ShutdownReason { get; set; }
        
        /// <summary>
        /// 理论日产量
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "理论日产量")]
        public decimal DailyOutput { get; set; }

        /// <summary>
        /// 规格编号
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "规格编号")]
        public int SpecificationID { get; set; }

        /// <summary>
        /// 是否禁用
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "是否禁用")]
        public int IsDisabled { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Display(Name = "备注")] 
        public string Remark { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "创建时间")]
        public DateTime Created_at { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "更新时间")]
        public DateTime Updated_at { get; set; }

        public virtual EquipmentArea.EquipmentArea EquipmentArea { get; set; }

        public virtual AdministrationArea.AdministrationArea AdministrationArea { get; set; }
    }
}
